package com.letoken.platform.repo.admin.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.time.LocalDateTime;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 后台用户表
 * </p>
 *
 * @author 作者
 * @since 2022-11-23
 */
@Getter
@Setter
@TableName("admin_user")
@ApiModel(value = "AdminUser对象", description = "后台用户表")
public class AdminUser {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("ID")
    @TableId(value = "admin_user_id", type = IdType.AUTO)
    private Integer adminUserId;

    @ApiModelProperty("用户名")
    @TableField("username")
    private String username;

    @ApiModelProperty("姓名")
    @TableField("name")
    private String name;

    @ApiModelProperty("登录密码MD5(密码+盐)")
    @TableField("password")
    private String password;

    @ApiModelProperty("登录密码盐")
    @TableField("salt")
    private String salt;

    @ApiModelProperty("用户登录token，登录即更新")
    @TableField("token")
    private String token;

    @ApiModelProperty("电话")
    @TableField("phone")
    private String phone;

    @ApiModelProperty("邮箱")
    @TableField("email")
    private String email;

    @ApiModelProperty("账号是否锁定 0正常 1异常")
    @TableField("locked")
    private Integer locked;

    @ApiModelProperty("最近登陆时间")
    @TableField("login_time")
    private LocalDateTime loginTime;

    @ApiModelProperty("创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @TableField("update_time")
    private LocalDateTime updateTime;

    @ApiModelProperty("是否删除 默认0不删除")
    @TableField("is_delete")
    private Integer isDelete;


}
